Dynamic compilers such as JIT (Just In Time) compilers, have been used in Java® program execution environments in recent years. When the need for executing an uncompiled portion of a program such as a Java® application arises during execution of the program, a dynamic compiler compiles a partial program in the program that is to be executed. This prevents a delay in activation of the program, which would arise if the entire program were compiled first, and also enables the program to be executed faster than interpreter execution.
For a faster execution of a program, a dynamic compiler obtains the status of execution of the program when compiling a partial program and compiles the partial program to generate an executable instruction stream optimized and compiled for that execution status. Information about the execution status which a dynamic compiler refers to in order to optimize an executable instruction stream includes information as to whether a class has been loaded or not and profile data during execution of the program. Even for a partial program that has been optimized for a certain execution status and compiled, the dynamic compiler may possibly further optimize and compile the partial program for a different execution status.
During debugging such a dynamic compiler, a problem in the dynamic compiler may not be able to be reproduced even if it compiles the same partial program, because the operation of the dynamic compiler changes depending on the execution status of the program. Furthermore, when a dynamic compiler is debugged in an environment different from a runtime environment of a program where a problem occurred, the problem in the dynamic compiler may not be able to be reproduced because the execution status of the program varies from runtime environment to environment.
A technology for reproducing an executable instruction stream compiled by a dynamic compiler has been disclosed in which, if a storage area for an executable instruction stream becomes insufficient during the execution of the program, the executable instruction stream is discarded and the execution status of the program is temporarily held and, when subsequently the executable instruction stream is required again, that execution status is used to re-compile the executable instruction stream (see Non-Patent Document 1), K. Konno, H. Komatsu, K. Ishizaki, “Offset-safe Compilation Method for Fixed-size Code Area Management,” Research Disclosure (Japan) 11-1998, v41, n415, article 415108